home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / rock / RTable$PasteAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  1.3 KB  |  44 lines

  1. package com.extensibility.rock;
  2.  
  3. import com.extensibility.app.UI;
  4. import java.awt.event.ActionEvent;
  5. import javax.swing.AbstractAction;
  6. import javax.swing.text.DefaultEditorKit;
  7. import javax.swing.text.JTextComponent;
  8. import javax.swing.text.TextAction;
  9.  
  10. public class RTable$PasteAction extends RAction {
  11.    // $FF: synthetic field
  12.    final RTable this$0;
  13.    TextAction textPaste;
  14.  
  15.    public RTable$PasteAction(RTable var1) {
  16.       super(UI.getString("edit.item.paste"), 86);
  17.       this.this$0 = var1;
  18.       this.textPaste = new DefaultEditorKit.PasteAction();
  19.       this.updateEnabled();
  20.    }
  21.  
  22.    public void updateEnabled() {
  23.       JTextComponent var1 = this.this$0.getCellEditorAsJTextComponent();
  24.       if (var1 != null) {
  25.          ((AbstractAction)this).setEnabled(this.textPaste.isEnabled());
  26.       } else {
  27.          boolean var2 = this.this$0.pasteable();
  28.          ((AbstractAction)this).setEnabled(var2);
  29.       }
  30.  
  31.    }
  32.  
  33.    public void actionOccurred(ActionEvent var1) {
  34.       JTextComponent var2 = this.this$0.getCellEditorAsJTextComponent();
  35.       if (var2 != null) {
  36.          this.textPaste.actionPerformed(var1);
  37.       } else {
  38.          this.this$0.paste();
  39.       }
  40.  
  41.       RTable.access$5000071(this.this$0);
  42.    }
  43. }
  44.